#ifndef SHARED_STRUCTURE
#define SHARED_STRUCTURE
#include <list>
#include <deque>




#define MIN(x,y) x<=y? x:y;
#define MAX(x,y) x>=y? x:y;
#define ROUND(x) floor(x + 0.5f);
const float PI = 3.1415926f;
const float NEGMAX = -1e10;

struct gabor{
		int x; // position along vertical axis
		int y; // position along horizontal axis
		int orient;// orientation. strart from horizontal, grows anti-clockwise
	};
	
	struct line{
		int x; // center position along vertical axis
		int y; // center position along horizontal axis
		int orient;//the same for structure gabor
		int length; // length fo the line.
	};
	

	struct lineVertex{
		float x_start,x_end,y_start,y_end;
	};


	struct deformation{
		std::deque<lineVertex> line_list;
	};
	
	struct activeShape{
		std::deque<lineVertex> line_list;
		std::deque<deformation> deformation_list;
		enum shapeType {CIRCLE, LINE, PARA_LINE, TRAPEZOIDS};
		shapeType type;
	};
	
	struct plane{
		float nt[4];
		float origin[3];
		float bu[3];
		float bv[3];
		float width;
		float height;
		float stp;
	};


#endif